#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QLabel>
#include <QImage>
#include <opencv2/opencv.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
protected slots:
    void openPicture();
    void grayImg();
    void avgImg();
    void checkSideImg();

private:
    QImage imageCenter(QImage img, QLabel* label);
private:
    Ui::MainWindow *ui;
    cv::Mat m_srcImg;
};
#endif // MAINWINDOW_H
